package com.itxzh.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

/**
 * desc
 *
 * @author ldt
 * @date 2019/12/25 10:48
 */
@Aspect
public class LogAspect {

    @Pointcut("execution(* com.itxzh.service.*.*(..))")
    public void pointCut(){}

    @Around("pointCut()")
    public void recorderLog(ProceedingJoinPoint joinPoint){
        try {
            joinPoint.proceed();
            System.out.println("记录日志操作...");
        } catch (Throwable throwable) {
            throwable.printStackTrace();
        }
    }
}
